const mongoose = require("mongoose")

const Schema = mongoose.Schema

const mesSchema = new Schema({
  name:{
    type:String,
    required:true
  },
  email:{
    type:String,
    required:true
  },
  phone:{
    type:String,
    required:true
  },
  message:String,
  date:{
    type:Number,
    default:Date.now
  },
  // 消息是否已读
  read:{
    type:Boolean,
    default:false
  }
})

module.exports = mongoose.model("message",mesSchema)